.menu {
    cursor: pointer;
    padding: 0;
    transition: 0.5s;
    position: relative;
    margin-right: 20px;
    box-sizing: border-box;
}

.menu:hover {
    color: #1890ff;
    transition: 0.5s;
}

.menu:hover::after {
    transition: 0.5s;
    opacity: 1;
}

.menu:after {
    opacity: 0;
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    bottom: 0;
    background-color: #1890ff;
}